package com.ehsy.service;

import com.dtflys.forest.annotation.*;
import com.dtflys.forest.http.ForestRequest;
import com.dtflys.forest.http.ForestResponse;
import com.ehsy.common.ResponseVo;
import com.ehsy.config.MyHostnameVerifier;
import com.ehsy.config.MySSLSocketFactoryBuilder;
import com.ehsy.model.UserInfo;
import org.springframework.stereotype.Component;

/**
 * @author YanZhen_Li
 * @version 1.0
 * @title HttpsTestService
 * @description
 * @create 2024/6/19 13:55
 */
@Component
@BaseRequest(
        baseURL = "https://localhost:8443"
)
public interface HttpsTestService {
    @Get("/test/request/json/body")
    ResponseVo<UserInfo> test1(@Query UserInfo user);

    @Get(url = "/user_info", keyStore = "keystore1")
    ForestResponse<String> test2();

    @Get("/user_info")
    @SSLSocketFactoryBuilder(MySSLSocketFactoryBuilder.class)
    ForestRequest<String> test3();

    @Get("/user_info")
    @SSLHostnameVerifier(MyHostnameVerifier.class)
    ForestRequest<String> test4();

}
